package com.lenovo.leos.filebrowser.netdisk;

import com.lenovo.leos.filebrowser.R;
import com.lenovo.leos.filebrowser.ui.FileBrowser;

import android.app.AlertDialog;
import android.app.ProgressDialog;
import android.content.Context;
import android.content.DialogInterface;

public class ErrorMessageDialog {
	private static final String TAG = "ErrorMessage";
	private static AlertDialog dialog;

	public static void showMessageDialog(Context context,
			String msg) {
		dialog = new AlertDialog.Builder(context)
				.setTitle(R.string.remind)
				.setMessage(msg)
				.setPositiveButton(R.string.dlg_btn_ok,
						new DialogInterface.OnClickListener() {

							@Override
							public void onClick(DialogInterface dialog,
									int which) {
								cancelDialog();
							}
						}).show();
	}

	public static void cancelDialog() {
		if (null != dialog)
			dialog.cancel();
	}
}
